package org.zhadoop.stream.cql.semanticanalyzer.parser.context;

import org.zhadoop.stream.cql.exception.SemanticAnalyzerException;
import org.zhadoop.stream.cql.semanticanalyzer.analyzecontext.expressiondesc.ExpressionDescribe;
import org.zhadoop.stream.cql.semanticanalyzer.parsecontextreplacer.ParseContextReplacer;
import org.zhadoop.stream.cql.semanticanalyzer.parsecontextwalker.ParseContextWalker;

public class IsNullLikeBetweenInExpressionContext extends BaseExpressionParseContext {
	// BinaryExpressionContext
	private BaseExpressionParseContext left;

	// NullConditionContext
	private BaseExpressionParseContext isNullExpression;

	// ExpressionLikeContext
	private BaseExpressionParseContext like;

	// ExpressionBetweenContext
	private BaseExpressionParseContext between;

	// ExpressionInContext
	private BaseExpressionParseContext in;

	@Override
	public void walkChildAndReplace(ParseContextReplacer replacer) {
		// TODO Auto-generated method stub

	}

	@Override
	protected ExpressionDescribe createExpressionDesc() throws SemanticAnalyzerException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String toString() {
		if (isNullExpression != null) {
			return left.toString() + " IS " + isNullExpression.toString();
		}

		if (like != null) {
			return left.toString() + " " + like.toString();
		}

		if (between != null) {
			return left.toString() + " " + between.toString();
		}

		if (in != null) {
			return left.toString() + " " + in.toString();
		}

		return left.toString();
	}

	@Override
	protected void walkChild(ParseContextWalker walker) {
		// TODO Auto-generated method stub

	}

	public BaseExpressionParseContext getLeft() {
		return left;
	}

	public void setLeft(BaseExpressionParseContext left) {
		this.left = left;
	}

	public BaseExpressionParseContext getIsNullExpression() {
		return isNullExpression;
	}

	public void setIsNullExpression(BaseExpressionParseContext isNullExpression) {
		this.isNullExpression = isNullExpression;
	}

	public BaseExpressionParseContext getLike() {
		return like;
	}

	public void setLike(BaseExpressionParseContext like) {
		this.like = like;
	}

	public BaseExpressionParseContext getBetween() {
		return between;
	}

	public void setBetween(BaseExpressionParseContext between) {
		this.between = between;
	}

	public BaseExpressionParseContext getIn() {
		return in;
	}

	public void setIn(BaseExpressionParseContext in) {
		this.in = in;
	}
	
}
